#ifndef __SCNS_DS18B20_H__
#define __SCNS_DS18B20_H__

#include "ScnsConfig.h"

#if defined(SCNS_DS18B20_ENABLE)&&SCNS_DS18B20_ENABLE==1

#include "ScnsBspDs18b20.h"

#include "ScnsYing.h"

typedef enum
{
    SCNS_DS18B20_STATUS_OK=SCNS_YING_STATUS_OK,
    SCNS_DS18B20_STATUS_BSP_FAILED=SCNS_YING_STATUS_BSP_FAILED,
    SCNS_DS18B20_STATUS_FAILED=SCNS_YING_STATUS_FAILED,
    SCNS_DS18B20_STATUS_TIME_OUT=SCNS_YING_STATUS_TIME_OUT,
    SCNS_DS18B20_STATUS_CRC_FAILED,
}ScnsDs18b20Status;

typedef struct
{
    float temperature;
}ScnsDs18b20Result;

extern ScnsDs18b20Result scnsDs18b20Result[SCNS_DS18B20_MAX];

extern ScnsDs18b20Status scnsDs18b20Init(ScnsDs18b20Enum ds1N);
extern void scnsDs18b20Interrupt(ScnsDs18b20Enum ds1N);
extern void scnsDs18b20Search(void);
extern void scnsDs18b20PrintId(ScnsDs18b20Enum ds1N);
#endif
#endif
